<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>LoadTexture</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">LoadTexture()</font></b></p>
<p><b>Syntax</b></p><blockquote>

Result = <font color="#006666"><b>LoadTexture</b></font>(#Texture, Filename$)</blockquote>

</blockquote>
<b>Description</b><br><blockquote>



Loads a new texture from the disk. Before loading a texture, an archive has to be specified with <a href="../engine3d/add3darchive.html">Add3DArchive()</a>. 
<br>
<br>
Texture format can be in PNG, TGA or JPG. It's strongly recommended to make the 
texture dimension square and with power of 2 width/height: 64x64, 128x128, 256x256... Old GFX cards can 
have limitation, so if possible limit the texture size to 256x256. 

 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Texture</i></td>
<td width="90%"> 
 
A number to identify the new texture. <a href="../reference/purebasic_objects.html">#PB_Any</a> can 
be used to auto-generate this number. 

 

</td></tr>
<tr><td><i>Filename$</i></td>
<td> 
 
The filename of the texture. 

 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>



Nonzero if the texture was successfully loaded, zero otherwise. If <font color="#924B72">#PB_Any</font> was used 
for the #Texture parameter then the generated number is returned on success. 

 

</blockquote><p><b>See Also</b></p><blockquote>

<a href="freetexture.html">FreeTexture()</a> 

</Blockquote><p><b>Supported OS  </b><Blockquote>All</Blockquote></p><center>&lt;- <a href=istexture.html>IsTexture()</a> - <a href=index.html>Texture Index</a> - <a href=saverendertexture.html>SaveRenderTexture()</a> -&gt;



</body></html>